import { request } from "./request"

export const apiCreateBlog = (data: any) => {
    return request('blog/create', 'POST', data);
}

export const apiDelBlog = (data: any) => {
    return request('blog/' + data, 'DELETE');
}

export const apiBlogByPage = (data: any) => {
    return request('blog/findByPage', 'GET', data);
}

export const apiBlogOne = (data: any) => {
    return request('blog/' + data.blogId + '?userId='+data.userId, 'GET');
}

export const apiCreateComment = (data: any) => {
    return request('comment/create', 'POST', data);
}

export const apiGetComment = (data: any) => {
    return request('comment/' + data, 'GET');
}

export const apiDelComment = (data: any) => {
    return request('comment/' + data, 'DELETE');
}

export const apiThumbUpBlog = (data: any) => {
    return request('thumb-up/create', 'POST', data);
}

export const apiUnThumbUpBlog = (data: any) => {
    return request('thumb-up/del', 'DELETE', data);
}